Repository navigation
ci: clean up leftover holodeck VPCs in us-west-2 - #940
Conversation
The periodic cleanup only swept us-west-1 and us-east-1. The gpu-driver-container precompiled e2e tests run their arm64 jobs in us-west-2, so VPCs leaked there were never removed and the region kept hitting VpcLimitExceeded. Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the change extending periodic VPC cleanup to us-west-2.
No open issues 🎉
What changed in this PR
Extends periodic AWS cleanup to us-west-2, where precompiled arm64 end-to-end tests can leave Holodeck VPCs behind and exhaust the region’s VPC quota.
Changes:
- Adds
us-west-2to the cleanup region matrix while retainingus-west-1andus-east-1.
| File | Description |
|---|---|
.github/workflows/periodic.yaml |
Includes us-west-2 in periodic VPC cleanup. |
Review effort: Balanced
ArangoGutierrez
left a comment
There was a problem hiding this comment.
Thanks, the matrix entry looks right. Every step already reads matrix.aws-region, so us-west-2 gets the same credentials, VPC query, and cleanup as the other two regions.
One thing to settle before merge. With force_cleanup: 'true' the action calls DeleteVPCResources directly (cmd/action/ci/vpc_cleanup.go:88-90) and skips the job-status check in CleanupVPC. That means the 00:00 and 12:00 UTC runs delete every tagged VPC in the region, including any VPC an e2e run is still using. Nothing in this repo's workflows or tests creates VPCs in us-west-2, so the VPCs this sweeps belong to the precompiled arm64 jobs in another repo. A run of theirs that is in flight at the cron hour would lose its VPC partway through.
Holodeck already tags each VPC with GitHubRepository and GitHubRunId (pkg/provider/aws/aws.go:195-196). Could us-west-2 run without force_cleanup and with GITHUB_TOKEN passed through, so that check runs? First confirm that this repo's token can read the other repo's run status. An age cutoff would also work.
Could the description also name the repo that runs the arm64 jobs?
The periodic cleanup force-deletes every VPC tagged Project=holodeck, Environment=cicd twice a day, including environments that are still in use, and a failed describe-vpcs call passes green with an empty list. These cases pin the selector the workflow will call: a VPC with an instance younger than the age floor is skipped, an old or empty VPC is selected in input order, and any failed aws call or unparseable LaunchTime exits with a documented code and prints nothing, so the cleanup never acts on a partial list. A PATH-shim aws stub serves the fixtures and rejects calls whose filters differ from production. The selector is a stub here, so every case fails. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
…cleanup Every holodeck VPC carries Project=holodeck, Environment=cicd, including one made by a local `holodeck create`, and the periodic job force-deleted all of them at 00:00 and 12:00 UTC with no age check. Its describe-vpcs call also ran without pipefail, so a failed call passed green with an empty list, and one region's failure cancelled the other matrix legs. The identify step now calls scripts/select-stale-vpcs.sh 6, which skips any VPC holding a non-terminated instance launched less than 6 hours ago and exits non-zero with nothing on stdout when an aws call fails or a LaunchTime does not parse. Timestamps are compared as epochs in bash, not through JMESPath string ordering. The 6h floor still removes a true leak within about 18h on the 12-hourly cron. The cleanup step stays on the pinned v0.5.1 action, so this takes effect on merge. The steps run under shell: bash, the matrix sets fail-fast: false, the post step reports how many VPCs were selected, and the Go workflow's check job runs the selector tests so a regression goes red. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Coverage Report for CI Build 45872230564Coverage remained the same at 51.84%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Description
Add us-west-2 to the regions the periodic cleanup sweeps for leftover holodeck VPCs.
Motivation
VpcLimitExceeded.Type of Change
Changes Made
aws-regionmatrix inperiodic.yaml.Testing
Test Commands Run
None; workflow-only change. It can be checked with a
workflow_dispatchrun after merge.Checklist
git commit -s)Additional Notes
The job runs with
force_cleanup: 'true', which skips the GitHub run status check, as it already does for the other two regions.